//
//  FlightListModel.m
//  lv678
//
//  Created by apple on 15/8/12.
//  Copyright (c) 2015年 lampshade. All rights reserved.
//  飞机航班数据模型实现类

#import "FlightListModel.h"
#import "FlightCodeListModel.h"

@implementation FlightListModel

- (instancetype)initWithDict:(NSDictionary *)dict{
    if (self = [super init]) {
        NSMutableArray *arryModels = [NSMutableArray array];
        [self setValuesForKeysWithDictionary:dict];
        for (NSDictionary *dict_code in self.Cabins) {
            FlightCodeListModel *code_model = [FlightCodeListModel codeWithDict:dict_code];
            [arryModels addObject:code_model];
        }
        self.Cabins = arryModels;
    }
    return self;
}

+ (instancetype)flightWithDict:(NSDictionary *)dict{
    return [[self alloc]initWithDict:dict];
}

@end
